#include "lib/pvmstrings.h"
#include <stdio.h>
#include <wchar.h>

#include "lib/memory/pvmmemory.h"

pvm_size pvm_strlen(const pvm_char* str)
{
  return wcslen((wchar_t*)str);
}

pvm_size pvm_strcmp(const pvm_char* str1, const pvm_char* str2)
{
  return wcscmp((const wchar_t*)str1, (const wchar_t*)str2);
}

pvm_size pvm_strncmp(const pvm_char* str1, const pvm_char* str2, pvm_size count)
{
  return wcsncmp((const wchar_t*)str1, (const  wchar_t*)str2, count);
}

pvm_char* pvm_strcpy(pvm_char* strDst, const pvm_char* strSrc)
{
  return (pvm_char*)wcscpy((wchar_t*)strDst, (const wchar_t*)strSrc);
}

pvm_char* pvm_strcat(pvm_char* strDst, const pvm_char* strSrc)
{
  return (pvm_char*)wcscat((wchar_t*)strDst, (const wchar_t*)strSrc);
}
